﻿<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="QuizControl.aspx.vb" Inherits="Training.QuizControl" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Training - Training:: Quiz Control</title>
<link rel="Stylesheet" type="text/css" media="screen" href="../css/adminStyle.css" />
</head>
<body>
    <form id="form1" runat="server">
    <div class="ctr">
        <h2>Quiz Control</h2>
        
        <h3>Quizzes</h3>
        
        <asp:GridView ID="gvQuizzes" runat="server" AllowPaging="True" 
            AllowSorting="True" AutoGenerateColumns="False" CellPadding="0" 
            DataKeyNames="QuizID" DataSourceID="dsQuizzes" Width="100%">
            <RowStyle CssClass="row1" />
            <EmptyDataRowStyle CssClass="row1" />
            <Columns>
                <asp:BoundField DataField="QuizName" HeaderText="Quiz Name" 
                    SortExpression="QuizName" >
                    <HeaderStyle HorizontalAlign="Left" />
                    <ItemStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="PassPercentage" HeaderText="Pass %" 
                    SortExpression="PassPercentage" >
                    <HeaderStyle HorizontalAlign="Center" />
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:BoundField DataField="CertificateImage" HeaderText="Certificate Image" 
                    SortExpression="CertificateImage" >
                    <HeaderStyle HorizontalAlign="Left" />
                    <ItemStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="QNum" HeaderText="# Questions" ReadOnly="True" 
                    SortExpression="QNum">
                <HeaderStyle HorizontalAlign="Center" />
                <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:HyperLinkField DataNavigateUrlFields="QuizID,QuizName,PassPercentage,CertificateImage" 
                    DataNavigateUrlFormatString="EditQuiz.aspx?qid={0}&amp;qn={1}&amp;pp={2}&amp;ci={3}" 
                    HeaderText="Edit" Text="edit">
                <HeaderStyle HorizontalAlign="Center" />
                <ItemStyle HorizontalAlign="Center" />
                </asp:HyperLinkField>
                <asp:TemplateField HeaderText="Add/Edit Questions">
                    <ItemTemplate>
                        <%#EditLink(Eval("QuizID"), Eval("QuizName"))%>
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Center" />
                    <ItemStyle HorizontalAlign="Center" />
                </asp:TemplateField>
            </Columns>
            <PagerStyle CssClass="small" />
            <HeaderStyle CssClass="rowHead" ForeColor="White" />
            <EditRowStyle CssClass="row1" />
            <AlternatingRowStyle CssClass="row2" />
        </asp:GridView>
        
        
        <p><b><a href="AddQuiz.aspx">Add Quiz</a> - 
        <a href="Questions.aspx">Questions</a> - 
        <a href="Answers.aspx">Answers</a></b></p>
        
        
        
        <br />
        <p><a href="Default.aspx">Admin Main</a></p>
    </div>
    <asp:SqlDataSource ID="dsQuizzes" runat="server" 
        ConnectionString="<%$ ConnectionStrings:Conn %>" 
        SelectCommand="proc_GetQuizInforWQuestCount" 
        SelectCommandType="StoredProcedure"></asp:SqlDataSource>
    
    </form>
</body>
</html>
